#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
void Xuan(char arr1[], char arr2[], int len,int* p)
{
	int i = 0;
	for (i = 0;i < len; i++)
	{
		int j = 0;
		char tmp = '0';
		tmp = arr1[0];
		for (j = 0; j < len - 1; j++)
		{
			arr1[j] = arr1[j + 1];
		}
		arr1[len - 1] = tmp;
		int k = 0;
		int count = 0;
		while (k < len)
		{
			if (arr1[k] == arr2[k])
				count++;
			k++;
		}
		if (count == len)
		{
			*p=1;
			break;
		}	
	}
}
int main()
{
	char arr1[6] = "EABCD";
	char arr2[6] = "CDEAB";

	int len1 = strlen(arr1);
	int len2 = strlen(arr2);
	int flag = 0;
	int* p = &flag;
	if (len1 == len2)
	{
		Xuan(arr1, arr2, len1,p);
	}
	printf("%d", flag);
	return 0;
}